home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 001a / tlxdsz21.zip / AUTOZCMD.SLT < prev    next >
Text File  |  1991-02-03  |  600b  |  13 lines

  1. main(str cmd)
  2. {
  3.  int old_zmod_auto;          // <-- int for previous status
  4.  if (not cmd)                // check passed parameters, abort if none
  5.   return;                    // 'not cmd' is TRUE if the str is empty
  6.  old_zmod_auto = _zmod_auto; // <-- store the old value
  7.  _zmod_auto = 1;             // <-- turn auto-Zmodem ON
  8.  cputs(cmd);                 // send the passed cmd to the BBS
  9.  cputs("^M");                // along with a CR or <Enter>
  10.  waitfor("Command? ", 300);  // wait up to 5 minutes for a main prompt
  11.  _zmod_auto = old_zmod_auto; // <-- reset auto-Zmodem as it was
  12. }
  13.